package com.wlhse.dao;

import com.wlhse.entity.ProblemDescriptionPojo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProblemDescriptionDao {
    //查询最后一个问题描述的code
    String queryLastCode();
    //增
    int addProblemDescription(ProblemDescriptionPojo pojo);
    //删 By id
    int deleteProblemDescription(@Param("id") Integer id);
    //改
    int updateProblemDescription(ProblemDescriptionPojo pojo);
    //查
    List<ProblemDescriptionPojo> queryProblemDescriptions(ProblemDescriptionPojo problemDescriptionPojo);
    //query total
    int queryTotal();
    //查 By id
    ProblemDescriptionPojo queryProblemDescriptionsById(@Param("id") Integer id);


    List<ProblemDescriptionPojo> queryProblemDescriptionsByDescription(@Param("description") String description);
    //得到queryProblemDescriptionsByDescription查询出来的数量
    int queryTotal2(@Param("description") String description);

    int addManyProblemDescriptions(List<ProblemDescriptionPojo> list);
}
